lib/fetcher-util: Use GIOErrorEnum instead of GIOError
authorRobert Fairley <rfairley@redhat.com>
Wed, 8 May 2019 23:15:53 +0000 (19:15 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 20 May 2019 13:09:28 +0000 (13:09 +0000)
Use GIOErrorEnum as the return value for
_ostree_fetcher_http_status_code_to_io_error(), to avoid an
implicit cast from GIOError.

Closes: #1857
Approved by: cgwalters

src/libostree/ostree-fetcher-util.c
src/libostree/ostree-fetcher-util.h

index ef02ba1ecb1581d1e33fd2f41049f27450900e4a..a9bd60a561b81d9ca59b2c1c091fa21717fe1a34 100644 (file)
@@ -219,9 +219,9 @@ _ostree_fetcher_should_retry_request (const GError *error,
 }
 
 /* Convert a HTTP status code representing an error from libsoup or libcurl to
- * a #GIOError. This will return %G_IO_ERROR_FAILED if the status code is
+ * a #GIOErrorEnum. This will return %G_IO_ERROR_FAILED if the status code is
  * unknown or otherwise unhandled. */
-GIOError
+GIOErrorEnum
 _ostree_fetcher_http_status_code_to_io_error (guint status_code)
 {
   switch (status_code)
index 1cade0686025bee7a6bd4eecfec3c8d6ec224eac..46935402760ef0d34f551ee4a16b8250dc87ccdd 100644 (file)
@@ -78,7 +78,7 @@ void _ostree_fetcher_journal_failure (const char *remote_name,
 gboolean _ostree_fetcher_should_retry_request (const GError *error,
                                                guint         n_retries_remaining);
 
-GIOError _ostree_fetcher_http_status_code_to_io_error (guint status_code);
+GIOErrorEnum _ostree_fetcher_http_status_code_to_io_error (guint status_code);
 
 G_END_DECLS